<?php

use app\components\BaseDetailView;
use yii\helpers\Url;

/* @var $model \app\models\Activity */
?>

<?php if($model->getIsVerify()): ?>
<div class="row box" id="toolbar">
    <div class="col-md-9 col-sm-8 col-xs-7">
        <button href="<?= Url::to(['allow', 'id' => $model->id]); ?>" class="get btn">通过审核</button>
        <button href="<?= Url::to(['deny', 'id' => $model->id]); ?>" class="deny btn danger batch-delete">审核拒绝</button>
    </div>
</div>
<?php endif; ?>

<?= BaseDetailView::widget([
    'model' => $model,
    'firstWidth' => '20%',
    'attributes' => [
        'id',
        'title',
        'start_time:datetime',
        'end_time:datetime',
        ['label' => '地址', 'value' => $model->getFullAddress()],
        'number',
        'company',
        'apply_number',
        'content:ntext',
        'ctime:datetime',
        ['label' => '状态', 'format' => 'raw', 'value' => $model->_statusLabel()],
        ['label' => '审核拒绝原因', 'visible' => $model->getIsVerifyDeny(), 'value' => $model->remark],
    ],
]) ?>

